package com.tianjipms.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tianjipms.entity.User;

import java.util.List;

public interface UserService extends IService<User> {
    boolean existsByuserPhone(String phone);
    IPage<User> findUserByRoleIdPage(IPage<User> page, Long roleId);
    /**
     * 根据用户名查询用户信息
     * @param userName
     * @return
     */
    User findUserByPhone(String phone);
    /**
     * 分配角色
     * @param userId
     * @param roleIds
     * @return
     */
    boolean saveUserRole(Long userId, List<Long> roleIds);
}
